package legoproject.TestStubs;

import legoproject.*;
import java.awt.*;
import javax.swing.*;

public class TouchSensorTestStub {

    private SimpleButton panel;

    public TouchSensorTestStub(String name, PCReporter reporter) {
        
        panel = new SimpleButton("TouchSensorTestStub " + name, false);
        panel.setOpaque(true);
        reporter.addComponent(panel);
    }

    public boolean isPressed() {
        /*boolean res = true;
        if (Math.random() < 0.1) {
        res = false;
        }
        //System.out.println("TouchSensorTestStub isPressed is called returns: " + res);
        return res;*/
        return panel.isDown();
    }
}



